import feedparser

def weather(location):
	location = location.replace(" ","%20")
	feed = feedparser.parse("http://rss.accuweather.com/rss/liveweather_rss.asp?locCode=%s"%location)
	current = feed['entries'][0]['summary_detail']['value']
	current = current.split("\n")
	currently = current[0].encode("utf-8")
	test = currently.rsplit(" ")
	#currently = currently.replace("xb0", "")
	#print currently

	if test[0] == "To":
		result = "Weather: Location not known"
	else:
		result = "Weather: %s" % currently
	return result

